import { useService } from '#hooks/useService';

export default function Example() {
  const { data, isLoading } = useService('getHello');
  return isLoading ? (
    <div>读取中...</div>
  ) : (
    <div>
      <p>这是在TS项目中混用JSX的例子</p>
      <p>
        远程返回的模拟数据：<code>{JSON.stringify(data)}</code>
      </p>
    </div>
  );
}
